import Vue from 'vue'
import VueRouter from 'vue-router'
// import HomeView from '../views/HomeView.vue'
import HomeView from '../views/HomeView.vue'

import salaryView from '../views/salaryView/salaryView.vue'
import salaryViewHome from '../views/salaryView/salaryViewHome.vue'
import salaryViewResult from '../views/salaryView/salaryViewResult.vue'

import priceView from '../views/priceView/priceView.vue'
import priceViewInputPage1 from '../views/priceView/priceViewInputPage1.vue'
import priceViewInputPage2 from '../views/priceView/priceViewInputPage2.vue'
import priceViewInputPage3 from '../views/priceView/priceViewInputPage3.vue'
import priceViewResult from '../views/priceView/priceViewResult.vue'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'home',
    component: HomeView
  },
  {
    path: '/salaryCalculator',
    name: 'salaryCalculator',
    component: salaryView,
    children:[
      {
        path: '/',
        component: salaryViewHome
      },
      {
        path: '/salaryViewResult',
        component: salaryViewResult
      }
    ]
  },
  {
    path: '/priceCalculator',
    name:'priceCalculator',
    component: priceView,
    children:[
      {
        path: '/',
        component: priceViewInputPage1
      },
      {
        path: '/priceViewInputPage2',
        component: priceViewInputPage2
      },
      {
        path: '/priceViewInputPage3',
        component: priceViewInputPage3
      },
      {
        path: '/priceViewResult',
        component: priceViewResult
      }
    ]
  }
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
